Studies on nonvolatile memories (nonvolatile random access memories (NVRAM)) that can be randomly accessed and can be rewritten with data are being actively made. Suggested examples of nonvolatile memories include magnetic random access memories (MRAMs) including spin transistor torque (STT)-RAMs, phase change memories (PCMs), and resistive random access memories (ReRAMs). Some of these memories are disclosed in Patent Document 1 shown below. MRAMs, PCMs, ReRAMs, and the like can achieve high degrees of integration, and have high rewrite speeds. In view of this, MRAMs, PCMs, ReRAMs, and the like are expected to be used as main storages to replace static random access memories (SRAMs) and dynamic random access memories (DRAMs).